<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //repeat()方法表示将原字符串重复n次，返回一个新的字符串
        var str = 'hello';
        var str1 = str.repeat(3);
        console.log(str1);
    </script>
</body>
</html>